import axios from "./axios";

export default {
  add: data => {
    return axios({
      method: "post",
      url: "/api/goods/add",
      data
    });
  },
  insertmany: data => {
    return axios({
      method: "post",
      url: "/api/users/insertmany",
      data
    });
  },
  update:(id,data)=>{
    return axios({
      method:"put",
      url:"/api/goods/modify/"+id,
      data
    })
  },
  query:(params)=>{
    return axios({
      method:"get",
      url:"/api/goods/get",
      params
    })
  },
  getAll: () => {
    return axios({
      method: "get",
      url: "/api/goods/getAll",
    });
  },
  delete:(id)=>{
    return axios({
      method:"delete",
      url:"/api/goods/delete/"+id
    })
  }
};
